<include file="public@header" />

<style type="text/css">
    .up_2,.up_5,.up_8{text-align: center;}
    .up_3,.up_6,.up_9{text-align: right;}
    .up_4,.up_5,.up_6{line-height: 50px;}
    .up_7,.up_8,.up_9{line-height: 80px;}

</style>

</head>
<body>
    <div class="layui-fluid js-check-wrap">
        <php>/*<ul class="nav nav-tabs">
            <li class="active"><a href="#A" data-toggle="tab">{:lang('WEB_SITE_INFOS')}</a></li>
            <li><a href="#B" data-toggle="tab">{:lang('SEO_SETTING')}</a></li>
            <!--<li><a href="#C" data-toggle="tab">{:lang('URL_SETTING')}</a></li>-->
            <!--<li><a href="#E" data-toggle="tab">{:lang('COMMENT_SETTING')}</a></li>-->
            <!-- <li><a href="#F" data-toggle="tab">用户注册设置</a></li> -->
            <!-- <li><a href="#G" data-toggle="tab">CDN设置</a></li> -->
            <li><a href="#H" data-toggle="tab">{:lang('WATER_SETTING')}</a></li>
        </ul>*/</php>

        <div class="layui-card">
            <div class="layui-card-header">{:lang('ADMIN_SETTING_SITE')}</div>
            <form class="layui-form js-ajax-form" role="form" action="{:url('setting/sitePost')}" method="post">
                <div class="layui-card-body">
                    <div class="layui-tab">
                        <ul class="layui-tab-title">
                            <li class="layui-this">
                                <span class="icon-wrapper"><i class="fa fa-align-center"></i></span>
                                <span class="text-wrapper">{:lang('WEB_SITE_INFOS')}</span>
                            </li>
                            <li>
                                <span class="icon-wrapper"><i class="fa fa-cog"></i></span>
                                <span class="text-wrapper">{:lang('SEO_SETTING')}</span>
                            </li>
                        </ul>

                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <div class="layui-card-body">
                                    <div class="layui-form-item">
                                        <label for="input-site-name" class="control-label layui-col-md2"><span class="form-required">*</span>{:lang('WEBSITE_NAME')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site-name" name="options[site_name]" value="{$site_name|default=''}">
                                        </div>
                                    </div>
                                    
                                    <!-- 手机端模板名称 -->
                                    <div class="layui-form-item">
                                        <label for="input-site-name" class="control-label layui-col-md2">{:lang('WAP_THEMS')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site-name" name="options[wap_thems]" value="{$wap_thems|default=''}">
                                            <p class="layui-word-aux">模板名称可在后台“设置”->“模板管理”->“模板名称”里面查看</p>
                                        </div>
                                    </div>

                                    <!-- 后台加密码 -->
                                    <div class="layui-form-item">
                                        <label for="input-admin_url_password" class="control-label layui-col-md2">后台加密码</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-admin_url_password" name="admin_settings[admin_password]" value="{$admin_settings.admin_password|default=''}" id="js-site-admin-url-password">
                                            <p class="layui-word-aux">英文字母数字，不能为纯数字。设置后必须通过域名加该密码访问后台,请劳记此地址，为了安全，您也可以定期更换此加密码!</p>
                                            <if condition="!empty($admin_settings.admin_password)">
                                                <php>
                                                    $site_admin_url_password =config("SP_SITE_ADMIN_URL_PASSWORD");
                                                    $root=cmf_get_root();
                                                    $root=empty($root)?'':'/'.$root;
                                                    $site_domain = cmf_get_domain().$root;
                                                </php>
                                                <p class="layui-word-aux">后台登录地址：<span id="js-site-admin-url">{:$site_domain}/{$admin_settings.admin_password}</span></p>
                                            </if>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label for="input-site-name" class="control-label layui-col-md2">{:lang('COMPANY_NAME')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site-name" name="options[site_company_name]" value="{$site_company_name|default=''}">
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label for="input-site-name" class="control-label layui-col-md2">{:lang('COMPANY_ADDRESS')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site-name" name="options[site_company_address]" value="{$site_company_address|default=''}">
                                        </div>
                                    </div>

                                    <div class="layui-form-item">
                                        <label for="input-site-name" class="control-label layui-col-md2">{:lang('HOTLINE')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site-name" name="options[site_hotline]" value="{$site_hotline|default=''}">
                                        </div>
                                    </div>


                                    
                                    <!--
                                    <div class="layui-form-item">
                                        <label for="input-mobile_tpl_enabled" class="control-label layui-col-md2">{:lang('ENABLE_MOBILE_THEME')}</label>
                                        <div class="layui-col-md10">
                                            <php>$mobile_tpl_enabled_checked=empty($mobile_tpl_enabled)?'':'checked';</php>
                                            <div class="checkbox">
                                                <label><input type="checkbox" name="options[mobile_tpl_enabled]" value="1" id="input-mobile_tpl_enabled" {$mobile_tpl_enabled_checked}></label>
                                            </div>
                                        </div>
                                    </div>
                                    -->
                                    <div class="form-group" style="display:none;">
                                        <label for="input-site_adminstyle" class="control-label layui-col-md2">{:lang('WEBSITE_ADMIN_THEME')}</label>
                                        <div class="layui-col-md10">
                                            <php>$site_admin_style=empty($admin_settings['admin_style'])?'':$admin_settings['admin_style'];</php>
                                            <select class="layui-input" name="admin_settings[admin_style]" id="input-site_adminstyle">
                                                <foreach name="admin_styles" item="vo">
                                                    <php>$admin_style_selected = $site_admin_style == $vo ? "selected" : "";</php>
                                                    <option value="{$vo}" {$admin_style_selected}>{$vo}</option>
                                                </foreach>
                                            </select>
                                        </div>
                                    </div>
                                    <!--
                                    <div class="layui-form-item">
                                        <label for="input-html_cache_on" class="control-label layui-col-md2">{:lang('HTML_CACHE')}</label>
                                        <div class="layui-col-md10">
                                            <php>$html_cache_on_checked=empty($html_cache_on)?'':'checked';</php>
                                            <div class="checkbox">
                                                <label><input type="checkbox" name="options[mobile_tpl_enabled]" value="1" id="input-html_cache_on" {$html_cache_on_checked}></label>
                                            </div>
                                        </div>
                                    </div>
                                    -->
                                    <div class="layui-form-item">
                                        <label for="input-site_icp" class="control-label layui-col-md2">{:lang('WEBSITE_ICP')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site_icp" name="options[site_icp]" value="{$site_icp|default=''}">
                                        </div>
                                    </div>
                                    <div class="form-group" style="display:none;">
                                        <label for="input-site_admin_email" class="control-label layui-col-md2">{:lang('WEBMASTER_EMAIL')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site_admin_email" name="options[site_admin_email]" value="{$site_admin_email|default=''}">
                                        </div>
                                    </div>
                                    
                                    <div class="layui-form-item">
                                        <label for="input-site_copyright" class="control-label layui-col-md2">{:lang('WEBSITE_COPYRIGHT_INFOMATION')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site_copyright" name="options[site_copyright]" value="{$site_copyright|default=''}">
                                        </div>
                                    </div>
                                    
                                    <!-- 统计代码 -->
                                    <div class="layui-form-item">
                                        <label for="input-site_analytics" class="control-label layui-col-md2">{:lang('WEBSITE_STATISTICAL_CODE')}</label>
                                        <div class="layui-col-md10">
                                            <textarea class="layui-textarea" rows="3" id="input-site_analytics" name="options[site_analytics]">{$site_analytics|default=''}</textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!-- SEO -->
                            <div class="layui-tab-item">
                                <div class="layui-card-body">
                                    <!-- <div class="layui-form-item">
                                        <label for="input-site_seo_title" class="control-label layui-col-md2">{:lang('WEBSITE_SEO_TITLE')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site_seo_title" name="options[site_seo_title]" value="{$site_seo_title|default=''}">
                                        </div>
                                    </div> -->
                                    <div class="layui-form-item">
                                        <label for="input-site_seo_keywords" class="control-label layui-col-md2">{:lang('WEBSITE_SEO_KEYWORDS')}</label>
                                        <div class="layui-col-md10">
                                            <input type="text" class="layui-input" id="input-site_seo_keywords" name="options[site_seo_keywords]" value="{$site_seo_keywords|default=''}">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label for="input-site_seo_description" class="control-label layui-col-md2">{:lang('WEBSITE_SEO_DESCRIPTION')}</label>
                                        <div class="layui-col-md10">
                                            <textarea class="layui-textarea" id="input-site_seo_description" name="options[site_seo_description]">{$site_seo_description|default=''}</textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- <div class="tab-pane fade in" id="C">
                                <div class="layui-form-item">
                                    <label for="input-urlmode" class="control-label layui-col-md2">{:lang('URL_MODE')}</label>
                                    <div class="layui-col-md10">
                                        <php>$url_modes=array( "1"=>lang('URL_PATHINFO_MODE'), "2"=>lang('URL_REWRITE_MODE'));</php>
                                        <select class="layui-input" name="options[urlmode]" id="input-urlmode">
                                            <foreach name="url_modes" item="vo">
                                            <php>$url_mode_selected=isset($urlmode)&&$key==$urlmode?"selected":"";</php>
                                            <option value="{$key}" {$url_mode_selected}>{$vo}</option>
                                            </foreach>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label for="input-html_suffix" class="control-label layui-col-md2">{:lang('URL_REWRITE_SUFFIX')}</label>
                                    <div class="layui-col-md10">
                                        <input type="text" class="layui-input" id="input-html_suffix" name="options[html_suffix]" value="{$html_suffix|default=''}">
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-col-smoffset-2 layui-col-sm10">
                                        <button type="submit" class="layui-btn layui-btn-normal js-ajax-submit" data-refresh="0">{:lang('SAVE')}</button>
                                    </div>
                                </div>
                            </div> -->
                            <!--
                            <div class="tab-pane fade in" id="E">
                                <div class="layui-form-item">
                                    <label class="control-label layui-col-md2">{:lang('COMMENT_CHECK')}</label>
                                    <div class="layui-col-md10">
                                        <php>$comment_need_checked=empty($comment_need_check)?"":"checked";</php>
                                        <div class="checkbox">
                                            <label><input type="checkbox" name="options[comment_need_check]" value="1" {$comment_need_checked}></label>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label for="input-comment_time_interval" class="control-label layui-col-md2">{:lang('COMMENT_TIME_INTERVAL')}</label>
                                    <div class="layui-col-md10">
                                        <input type="text" class="layui-input" id="input-comment_time_interval" name="options[comment_time_interval]" value="{$comment_time_interval|default=60}">
                                        <p class="layui-word-aux">单位秒</p>
                                    </div>
                                </div>
                            </div>
                            -->
                            <!-- <div class="tab-pane fade in" id="F">
                                <div class="layui-form-item">
                                    <label for="input-banned_usernames" class="control-label layui-col-md2">是否开放注册</label>
                                    <div class="layui-col-md10">
                                        <select class="layui-input" name="cmf_settings[open_registration]">
                                            <option value="0">否</option>
                                            <php>$open_registration_selected = empty($cmf_settings['open_registration'])?'':'selected';</php>
                                            <option value="1" {$open_registration_selected}>是</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <label for="input-banned_usernames" class="control-label layui-col-md2">{:lang('SPECAIL_USERNAME')}</label>
                                    <div class="layui-col-md10">
                                        <textarea class="layui-input" id="input-banned_usernames" name="cmf_settings[banned_usernames]">{$cmf_settings.banned_usernames}</textarea>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-col-smoffset-2 layui-col-sm10">
                                        <button type="submit" class="layui-btn layui-btn-normal js-ajax-submit" data-refresh="0">{:lang('SAVE')}</button>
                                    </div>
                                </div>
                            </div> -->
                            <!-- <div class="tab-pane fade in" id="G">
                                <div class="layui-form-item">
                                    <label for="input-cdn_static_root" class="control-label layui-col-md2">静态资源cdn地址</label>
                                    <div class="layui-col-md10">
                                        <input type="text" class="layui-input" id="input-cdn_static_root" name="cdn_settings[cdn_static_root]" value="{$cdn_settings.cdn_static_root|default=''}">
                                        <p class="layui-word-aux">
                                            不能以/结尾；设置这个地址后，请将ThinkCMF下的静态资源文件放在其下面；<br>
                                            ThinkCMF下的静态资源文件大致包含以下(如果你自定义后，请自行增加)：<br>
                                            themes/admin_simplebootx/public/assets<br>
                                            static<br>
                                            themes/simplebootx/public/assets<br>
                                            例如未设置cdn前：jquery的访问地址是/static/js/jquery.js, <br>
                                            设置cdn是后它的访问地址就是：静态资源cdn地址/static/js/jquery.js
                                        </p>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-col-smoffset-2 layui-col-sm10">
                                        <button type="submit" class="layui-btn layui-btn-normal js-ajax-submit" data-refresh="0">{:lang('SAVE')}</button>
                                    </div>
                                </div>
                            </div> -->
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="layui-col-md-offset2 layui-col-md10">
                                <button type="submit" class="layui-btn layui-btn-normal width-100 padding-sm js-ajax-submit" data-refresh="1">{:lang('SAVE')}</button>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
            </form>
        </div>

    </div>
    

<include file="public@footer"/>
